#include <stdio.h>
#include <unistd.h>

int main()
{
    printf("begin exec...\n");
    execl("/usr/bin/ls","/usr/bin/ls","-a",NULL);
    
    // execlp("ls","ls","-a",NULL);
    
    // execlp("hello","hello",NULL);
    // perror("execlp");
    
    // extern char** environ;  
    // execle("/usr/bin/pwd","/usr/bin/pwd",NULL,environ);
    
   // char* argv[10] = {NULL};
   // argv[0] = "/usr/bin/ls";
   // argv[1] = "-l";
   // argv[2] = NULL;
    // execv("/usr/bin/ls",argv);
    // execvp("ls",argv);
   // extern char** environ;
   // execve("/usr/bin/ls",argv,environ);
    printf("exec failed\n");
    return 0;
}
